<template>
  <div>count:{{ count }}</div>
  <button @click="setCount">按钮</button>
  <ul>
    <li v-for="(value, key) in person" :key="key">{{ key }} -{{ value }}</li>
  </ul>
  <button @click="person.age = 18">++</button>
</template>

<script lang="ts">
interface IData {
  count: number;
  person: {
    name: string;
    age?: number;
  };
}
export default {
  name: "App",
  data(): IData {
    return {
      count: 0,
      person: {
        name: "jane",
      },
    };
  },
  methods: {
    setCount() {
      this.count++;
    },
  },
};
</script>

<style></style>
